#include <boost/test/unit_test.hpp>

#include <phalanx/functional/size.hpp.cu>
using namespace phalanx;

namespace ns_size
{

BOOST_AUTO_TEST_CASE( vector )
{
    const int i = 0;
    BOOST_REQUIRE(( 1 == size( i ) ));

    const int1 i1 = {};
    BOOST_REQUIRE(( 1 == size( i1 ) ));

    const int2 i2 = {};
    BOOST_REQUIRE(( 2 == size( i2 ) ));

    const int3 i3 = {};
    BOOST_REQUIRE(( 3 == size( i3 ) ));

    const int4 i4 = {};
    BOOST_REQUIRE(( 4 == size( i4 ) ));
}

BOOST_AUTO_TEST_CASE( array )
{
    const int a1[ 1 ] = {};
    BOOST_REQUIRE(( 1 == size( a1 ) ));

    const int a5[ 5 ] = {};
    BOOST_REQUIRE(( 5 == size( a5 ) ));
}

} // namespace ns_size

